using NUnit.Framework;
using wpffc.contracts.domaindata;
using wpffc.flashcardbox.domaindata;

namespace wpffc.flashcardbox.tests.domaindata
{
    [TestFixture]
    public class test_FlashCardBox
    {
        [Test]
        public void Create_box()
        {
            var sut = new FlashCardBox(1, 3, new[] {1, 2});

            sut.Batch.Enqueue(new BatchCard());
            sut.Batch.Enqueue(new BatchCard());
            sut.Batch.Enqueue(new BatchCard());

            sut.Compartments[0].Enqueue(new Card());

            sut.Compartments[1].Enqueue(new Card());
            sut.Compartments[1].Enqueue(new Card());

            sut.Archive.Enqueue(new Card());

            Assert.AreEqual(BatchStatus.Full, sut.Batch.Status);
            Assert.AreEqual(2, sut.Compartments.Length);
            Assert.AreEqual(CompartmentStatus.Full, sut.Compartments[0].Status);
            Assert.AreEqual(CompartmentStatus.Full, sut.Compartments[1].Status);
            Assert.AreEqual(1, sut.Archive.Count);
        }
        
    }
}